package com.example.backend.repository;

import com.example.backend.entity.Customer;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.repository.CrudRepository;

import java.util.List;
import java.util.Optional;

public interface CustomerRepository extends JpaRepository<Customer,Integer>, CrudRepository<Customer,Integer> {
    Optional<Customer> findById (Integer id);
    List<Customer> findByName(String name);
    List<Customer> findByIdentity(String identity);
    List<Customer> findByAge(Integer age);
    List<Customer> findByAddress(String address);
    List<Customer> findByPhone(String phone);
}
